import ajax from './ajax.js'
const baseUrl = 'https://cnodejs.org'

const api = {
  getTopics(data) {
    return ajax(baseUrl + '/api/v1/topics',data||{},'GET')
  },
  login(data) {
    return ajax(baseUrl + '/api/v1/accesstoken?accesstoken=' + data , {}, 'POST')
  }
}
export default api